#!/usr/bin/python
# -*-coding: UTF-8 -*-
"""
# Time: 2025/4/20 21:15
# @Project_name: PROJECT_NAME
"""
a = 5
if a == 0 or a == 0 and a != 1:
    print("a等于0")
elif a > 0:
    print("a大于0")
else:
    print("a小于0")
list1 = ["周先生", "毛先生", "郭先生"]
print(len(list1))
for i in range(len(list1)):
    if list1[i] == "毛先生":
        break
    print(list1[i])

# a = int(input("输出被除数："))
# b = int(input("输出除数："))
a = 10
b = 5
try:
    c = a / b
    print("求商", c)
    c = a // b
    print("求模", c)
    c = a % b
    print("求余", c)
except ZeroDivisionError:
    print("出现异常了")
finally:
    print("无论是否出异常：finally块都会执行")

# 读取整个文件
with open("testFiles/test2File1.txt", encoding='utf-8') as file:
    contents = file.read()
print("输出全部内容：", contents)

# 逐行输出
with open("testFiles/test2File1.txt", encoding='utf-8') as file:
    for line in file:
        print(line.strip())



